#ifndef TESTWAYPOINTLIST_H
#define TESTWAYPOINTLIST_H

#include <QObject>
#include <QDateTime>
#include <QtTest/QtTest>
#include "../FSXSimConnect/waypointlist.h"
using namespace FsxSimConnect;

namespace FsxWsTest {

//! Testing the waypoint list
class TestWaypointList : public QObject
{
    Q_OBJECT

private:
    //! Fill with waypoints.
    /*! \param timeframeMs update within timeframe, or -1 for always append
        \param fillNumber number of waypoints */
    WaypointList fillWaypoints(const qint64 timeframeMs, const int fillNumber = TESTWPLISTCOUNT);
    //! Set times for waypoints
    /*! waypointList */
    qint64 setWaypointTimes(WaypointList &waypointList);
    //! Create waypoints and init them.
    void createWaypointAndInit();
    //! Fill waypoints and test reduce methods.
    void fillAndReduceWaypoints();

public:
    //! Constructor.
    TestWaypointList();

private Q_SLOTS:
    //! Unit test.
    void benchmarkWaypointFillWithoutTimeframe();
    //! Unit test.
    void benchmarkCreateWaypoints();
    //! Benchmark test: Filling waypoints and run an absolute reduce
    void benchmarkFillAndReduceWaypoints();
    //! Unit test.
    void testWaypointFillWithTimeFrame();
    //! Unit test.
    void testWaypointFillWithoutTimeframe();
    //! Unit test: Filling waypoints and run an absolute reduce
    void testWaypointReduceAbsolute();
    //! Unit test: Filling waypoints and reduce within timeframe
    void testWaypointReduceTimeframe();
    //! Unit test: Test correct update / remove same waypoints
    void testWaypointUpdateAndRemoveRedundantWaypoints();
};

} // namespace

#endif // TESTWAYPOINTLIST_H
